using System;
using System.Collections.Generic;
using System.Text;
using AF_ORM.CORE;
using System.Data;
using System.Configuration;
using Bussiness.Config;     
using Bussiness.Entity;
namespace Bussiness.ManagerBase
{
                

     public abstract class Aspnet_UsersInRolesManagerBase
    {
        public Aspnet_UsersInRolesManagerBase()
        {
            Adapter.ConnectionString =  ConnectionConfig.ConnectionString;            
        }
                    
 
        /// <summary>
        /// Them moi du lieu
        /// </summary>
        /// <returns>Aspnet_UsersInRolesEntity</returns>
        public Aspnet_UsersInRolesEntity Insert(Aspnet_UsersInRolesEntity obj)
        { 
            return (Aspnet_UsersInRolesEntity) Adapter.Insert(obj);             
        }
 
 
        /// <summary>
        /// Update du lieu theo khoa chinh cua object
        /// </summary>
        /// <returns>Aspnet_UsersInRolesEntity</returns>
        public Aspnet_UsersInRolesEntity Update(Aspnet_UsersInRolesEntity obj)
        { 
            return (Aspnet_UsersInRolesEntity)Adapter.Update(obj);             
        }
 
 
        public Aspnet_UsersInRolesEntity Delete(Aspnet_UsersInRolesEntity obj)
        { 
            return (Aspnet_UsersInRolesEntity)Adapter.Delete(obj);             
        }
 


        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien RoleId duoc set trong object
        /// </summary>
        /// <returns>Aspnet_UsersInRolesEntity</returns>
        public Aspnet_UsersInRolesEntity DeleteByRoleId (Aspnet_UsersInRolesEntity obj)
        { 
            return (Aspnet_UsersInRolesEntity)Adapter.DeleteByField(obj,"RoleId");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien RoleId 
        /// </summary>
        /// <returns>Aspnet_UsersInRolesEntity</returns>
        public Aspnet_UsersInRolesEntity DeleteByRoleId (Guid RoleId )
        { 
            Aspnet_UsersInRolesEntity obj = new Aspnet_UsersInRolesEntity();
            obj.RoleId = RoleId;  
            return (Aspnet_UsersInRolesEntity)Adapter.DeleteByField(obj,"RoleId");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien UserId duoc set trong object
        /// </summary>
        /// <returns>Aspnet_UsersInRolesEntity</returns>
        public Aspnet_UsersInRolesEntity DeleteByUserId (Aspnet_UsersInRolesEntity obj)
        { 
            return (Aspnet_UsersInRolesEntity)Adapter.DeleteByField(obj,"UserId");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien UserId 
        /// </summary>
        /// <returns>Aspnet_UsersInRolesEntity</returns>
        public Aspnet_UsersInRolesEntity DeleteByUserId (Guid UserId )
        { 
            Aspnet_UsersInRolesEntity obj = new Aspnet_UsersInRolesEntity();
            obj.UserId = UserId;  
            return (Aspnet_UsersInRolesEntity)Adapter.DeleteByField(obj,"UserId");
        }

 
        /// <summary>
        /// Lay du lieu theo khoa chinh object
        /// </summary>
        /// <returns></returns>
        public Aspnet_UsersInRolesEntity Select(Aspnet_UsersInRolesEntity obj)
        { 
            return (Aspnet_UsersInRolesEntity) Adapter.Select(obj);             
        }
 
 
        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns></returns>
        public DataTable SelectWithCondition(Aspnet_UsersInRolesEntity obj)
        { 
            return  Adapter.SelectWithCondition(obj);             
        }
 
 
        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns></returns>
        public DataTable SelectWithCondition(Aspnet_UsersInRolesEntity obj,SelectOptions option)
        {             
            return  Adapter.SelectWithCondition(obj,option);             
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public DataTable SelectAll()
        { 
            return Adapter.SelectAll(new Aspnet_UsersInRolesEntity());             
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public DataTable SelectAll(SelectOptions option)
        { 
            return Adapter.SelectAll(new Aspnet_UsersInRolesEntity(),option);             
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public List<Aspnet_UsersInRolesEntity> SelectAllLST()
        { 
            return  (List<Aspnet_UsersInRolesEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectAll(new Aspnet_UsersInRolesEntity()),new Aspnet_UsersInRolesEntity());           
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public List<Aspnet_UsersInRolesEntity> SelectAllLST(SelectOptions option)
        { 
            return (List<Aspnet_UsersInRolesEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectAll(new Aspnet_UsersInRolesEntity(),option),new Aspnet_UsersInRolesEntity());             
        }
 

        /// <summary>
        /// Lay du lieu theo cac dieu kien RoleId duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByRoleId (Aspnet_UsersInRolesEntity obj)
        { 
            return Adapter.SelectByField(obj,"RoleId");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien RoleId duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByRoleId (Aspnet_UsersInRolesEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"RoleId",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien RoleId duoc set trong object
        /// </summary>
        /// <returns>List<Aspnet_UsersInRolesEntity></returns>
        public List<Aspnet_UsersInRolesEntity> SelectByRoleIdLST (Aspnet_UsersInRolesEntity obj)
        { 
            return  (List<Aspnet_UsersInRolesEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"RoleId"),new Aspnet_UsersInRolesEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien RoleId duoc set trong object
        /// </summary>
        /// <returns>List<Aspnet_UsersInRolesEntity></returns>
        public List<Aspnet_UsersInRolesEntity> SelectByRoleIdLST (Aspnet_UsersInRolesEntity obj,SelectOptions option)
        { 
            return  (List<Aspnet_UsersInRolesEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"RoleId",option),new Aspnet_UsersInRolesEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien RoleId 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByRoleId (Guid RoleId )
        { 
            Aspnet_UsersInRolesEntity obj = new Aspnet_UsersInRolesEntity();
            obj.RoleId = RoleId;  
            return Adapter.SelectByField(obj,"RoleId");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien RoleId duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByRoleId (Guid RoleId, SelectOptions option)
        { 
            Aspnet_UsersInRolesEntity obj = new Aspnet_UsersInRolesEntity();
            obj.RoleId = RoleId;  
            return Adapter.SelectByField(obj,"RoleId",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien RoleId 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<Aspnet_UsersInRolesEntity> SelectByRoleIdLST (Guid RoleId )
        { 
            Aspnet_UsersInRolesEntity obj = new Aspnet_UsersInRolesEntity();
            obj.RoleId = RoleId;  
            return  (List<Aspnet_UsersInRolesEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"RoleId"),new Aspnet_UsersInRolesEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien RoleId duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<Aspnet_UsersInRolesEntity> SelectByRoleIdLST (Guid RoleId, SelectOptions option)
        { 
            Aspnet_UsersInRolesEntity obj = new Aspnet_UsersInRolesEntity();
            obj.RoleId = RoleId;  
            return  (List<Aspnet_UsersInRolesEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"RoleId",option),new Aspnet_UsersInRolesEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UserId duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByUserId (Aspnet_UsersInRolesEntity obj)
        { 
            return Adapter.SelectByField(obj,"UserId");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UserId duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByUserId (Aspnet_UsersInRolesEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"UserId",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UserId duoc set trong object
        /// </summary>
        /// <returns>List<Aspnet_UsersInRolesEntity></returns>
        public List<Aspnet_UsersInRolesEntity> SelectByUserIdLST (Aspnet_UsersInRolesEntity obj)
        { 
            return  (List<Aspnet_UsersInRolesEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"UserId"),new Aspnet_UsersInRolesEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UserId duoc set trong object
        /// </summary>
        /// <returns>List<Aspnet_UsersInRolesEntity></returns>
        public List<Aspnet_UsersInRolesEntity> SelectByUserIdLST (Aspnet_UsersInRolesEntity obj,SelectOptions option)
        { 
            return  (List<Aspnet_UsersInRolesEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"UserId",option),new Aspnet_UsersInRolesEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UserId 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByUserId (Guid UserId )
        { 
            Aspnet_UsersInRolesEntity obj = new Aspnet_UsersInRolesEntity();
            obj.UserId = UserId;  
            return Adapter.SelectByField(obj,"UserId");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UserId duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByUserId (Guid UserId, SelectOptions option)
        { 
            Aspnet_UsersInRolesEntity obj = new Aspnet_UsersInRolesEntity();
            obj.UserId = UserId;  
            return Adapter.SelectByField(obj,"UserId",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UserId 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<Aspnet_UsersInRolesEntity> SelectByUserIdLST (Guid UserId )
        { 
            Aspnet_UsersInRolesEntity obj = new Aspnet_UsersInRolesEntity();
            obj.UserId = UserId;  
            return  (List<Aspnet_UsersInRolesEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"UserId"),new Aspnet_UsersInRolesEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien UserId duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<Aspnet_UsersInRolesEntity> SelectByUserIdLST (Guid UserId, SelectOptions option)
        { 
            Aspnet_UsersInRolesEntity obj = new Aspnet_UsersInRolesEntity();
            obj.UserId = UserId;  
            return  (List<Aspnet_UsersInRolesEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"UserId",option),new Aspnet_UsersInRolesEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns>List<Aspnet_UsersInRolesEntity></returns>
        public List<Aspnet_UsersInRolesEntity> SelectWithConditionLST (Aspnet_UsersInRolesEntity obj)
        { 
            return  (List<Aspnet_UsersInRolesEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectWithCondition(obj),new Aspnet_UsersInRolesEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns>List<Aspnet_UsersInRolesEntity></returns>
        public List<Aspnet_UsersInRolesEntity> SelectWithConditionLST (Aspnet_UsersInRolesEntity obj,SelectOptions option)
        { 
            return  (List<Aspnet_UsersInRolesEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectWithCondition(obj,option),new Aspnet_UsersInRolesEntity());
        }

}
}
